<table id="datagrid_${action_id}"></table>
<div id="datagrid_tb_${action_id}" style="padding:5px;height:auto">
	${action.getDatagridTitle('gmtCreate')}: <input class="easyui-datebox" data-options="editable:false" name="_searcher_ge_gmtCreate?date">
		TO: <input class="easyui-datebox" data-options="editable:false" name="_searcher_le_gmtCreate?date" >
		&nbsp;&nbsp;&nbsp;&nbsp;
	${action.getDatagridTitle('state')}:
	<select class="easyui-combobox" name="_searcher_eq_state?int" style="width: 120px;">
		<option value="" >---</option>
		<#list states as st>
			<#if st.state!=-1>
				<option value="${st.state}" >${action.getDatagridTitle('state.'+st.name())}</option>
			</#if>
		</#list>
	</select>
	&nbsp;&nbsp;&nbsp;&nbsp;
	${action.getDatagridTitle('name')}:
	<input class="easyui-validatebox" style="width: 200px;" name="_searcher_lky_name" >
	&nbsp;&nbsp;&nbsp;&nbsp;
	<a href="javascript:;;" onclick="javascript:$('#datagrid_tb_${action_id}').searcher('doSearch')" class="easyui-linkbutton" iconCls="icon-search">查询</a>
</div>
<script type="text/javascript">

$(function() {
	
	$('#datagrid_tb_${action_id}').searcher({
		doSearch:function(qp){
			$('#datagrid_${action_id}').datagrid('options').queryParams = qp;
			$('#datagrid_${action_id}').datagrid('reload');
		}
	});
	
	$('#datagrid_${action_id}').datagrid({
	iconCls:'icon-save',
	width:'auto',
	height:'auto',
	nowrap: false,
	fit:true,
	singleSelect:true,
	fitColumns:true,
	striped: true,
	sortName: 'id',
	sortOrder: 'desc',
	url:'${request.contextPath}${namespace?default('')}/mp/review/review-datagrid.json',
	remoteSort: true,
	idField:'id',
	onBeforeLoad:function(){$('#datagrid_${action_id}').datagrid('unselectAll');},
	columns:[[
				{title:'${action.getDatagridTitle('member')}',field:'memberName',width:100,align:'center'},
				{title:'${action.getDatagridTitle('intentionCar')}',field:'intentionCar',width:100,align:'center'},
				{title:'${action.getDatagridTitle('intentionPrice')}',field:'intentionPrice',width:100,align:'center',formatter:function(val,rec){
					<#list prices as price>
					if(${price.level}==val){
						return '${action.getDatagridTitle('intentionPrice.'+price.name())}';
					}
					</#list>
				}},
				{title:'${action.getDatagridTitle('province')}',field:'province',width:100,align:'center',formatter:function(val,rec){
					return rec.provinceStr + " " + rec.cityStr;
				}},
				{title:'${action.getDatagridTitle('marriage')}',field:'marriage',width:100,align:'center',formatter:function(val,rec){
					if(val==1){
						return '是';
					}else{
						return '否';
					}
				}},
				{title:'${action.getDatagridTitle('house')}',field:'house',width:100,align:'center',formatter:function(val,rec){
					if(val==1){
						return '是';
					}else{
						return '否';
					}
				}},
				{title:'${action.getDatagridTitle('name')}',field:'name',width:100,align:'center'},
				{title:'${action.getDatagridTitle('phone')}',field:'phone',width:100,align:'center'},
				{title:'${action.getDatagridTitle('identitys')}',field:'identitys',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.identityList.length;i++){
						s += "<a href="+rec.review_path+rec.identityList[i]+">"+rec.identityList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('state')}',field:'state',width:100,align:'center',formatter:function(val,rec){
					<#list states as state>
					if(${state.state}==val){
						return '${action.getDatagridTitle('state.'+state.name())}';
					}
					</#list>
				}},
				{title:'${action.getDatagridTitle('gmtCreate')}',field:'gmtCreate',width:100,align:'center'},
				{title:'${action.getDatagridTitle('accountBook')}',field:'accountBook',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.accountBookList.length;i++){
						s += "<a href="+rec.review_path+rec.accountBookList[i]+">"+rec.accountBookList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('marriageCertificate')}',field:'marriageCertificate',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.marriageCertificateList.length;i++){
						s += "<a href="+rec.review_path+rec.marriageCertificateList[i]+">"+rec.marriageCertificateList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('houseCertificate')}',field:'identitys',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.houseCertificateList.length;i++){
						s += "<a href="+rec.review_path+rec.houseCertificateList[i]+">"+rec.houseCertificateList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('income')}',field:'income',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.incomeList.length;i++){
						s += "<a href="+rec.review_path+rec.incomeList[i]+">"+rec.incomeList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('bank')}',field:'bank',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.bankList.length;i++){
						s += "<a href="+rec.review_path+rec.bankList[i]+">"+rec.bankList[i]+"</a><br/>";
					}
					return s;
				}},
				{title:'${action.getDatagridTitle('driversLicense')}',field:'driversLicense',width:100,align:'center',formatter:function(val,rec){
					var s = "";
					for(var i=0;i<rec.driversLicenseList.length;i++){
						s += "<a href="+rec.review_path+rec.driversLicenseList[i]+">"+rec.driversLicenseList[i]+"</a><br/>";
					}
					return s;
				}}
			]],
	pagination:true,
	rownumbers:true,
	toolbar:'#datagrid_tb_${action_id}',
	onDblClickRow:function(idx,data){if(typeof onDblClickRow_${action_id} != 'undefined'){onDblClickRow_${action_id}(idx,data)}},
	onClickRow:function(idx,data){if(typeof onClickRow_${action_id} != 'undefined'){onClickRow_${action_id}(idx,data)}},
	onRowContextMenu:function(e,idx,data){if(typeof onRowContextMenu_${action_id} != 'undefined'){$(this).datagrid('selectRow', idx);onRowContextMenu_${action_id}(e,idx,data)}}
});

});

</script>
